package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 菜单数据范围权限表
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tm_permission_menu_range")
public class PermissionMenuRangePO extends DMSBasePO<PermissionMenuRangePO> {

    private static final long serialVersionUID = 1L;

    @TableField("MENU_RANGE_ID")
    private Integer menuRangeId;
    /**
     * 权限菜单id
     */
    @TableField("PERMISSION_MENU_ID")
    private Long permissionMenuId;
    @TableField("IS_FLEXIBLE")
    private Integer isFlexible;
    @TableField("IS_EMPOWERED")
    private Integer isEmpowered;

    public PermissionMenuRangePO() {
        super();
    }


    public Integer getMenuRangeId() {
        return menuRangeId;
    }

    public void setMenuRangeId(Integer menuRangeId) {
        this.menuRangeId = menuRangeId;
    }

    public Long getPermissionMenuId() {
        return permissionMenuId;
    }

    public void setPermissionMenuId(Long permissionMenuId) {
        this.permissionMenuId = permissionMenuId;
    }

    public Integer getIsFlexible() {
        return isFlexible;
    }

    public void setIsFlexible(Integer isFlexible) {
        this.isFlexible = isFlexible;
    }

    public Integer getIsEmpowered() {
        return isEmpowered;
    }

    public void setIsEmpowered(Integer isEmpowered) {
        this.isEmpowered = isEmpowered;
    }

    @Override
    protected Serializable pkVal() {
        return this.menuRangeId;
    }

    @Override
    public String toString() {
        return "PermissionMenuRangePO{" +
        "menuRangeId=" + menuRangeId +
        ", permissionMenuId=" + permissionMenuId +
        ", isFlexible=" + isFlexible +
        ", isEmpowered=" + isEmpowered +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "menuRangeId");
    }


}
